package com.li.friend.domain.user.dto;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class UserDTO {

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Size(min = 11, max = 11, message = "手机格式不正确")
    private String phone;

    private String nickName;

    @Size(min = 8, max = 20, message = "密码长度不能少于8位，不能大于20位")
    private String password;

    @NotNull(message = "邮箱不能为空")
    @Email
    private String email;

    private String code;
}
